This invention relates to a wireless communication method, and specifically to a method for connecting a device to a wireless USB (Universal Serial Bus).
The USB is specified as a standard xe2x80x9cPoint to Multipointxe2x80x9d interface, which connects a computer to low and medium speed devices, such as a mouse, a keyboard and a printer, as detailed in co-pending Japanese Patent Application No: 09-212784, assigned to the present assignee, the teachings of which are incorporated by reference herein. While conventionally a connection destination has to be selected for each device, such as a keyboard port for a keyboard, a mouse port for a mouse, a printer port for a printer, and a serial port for a modem, when the USB is employed, a USB device need only be connected to a USB port. In addition, since the USB supports the Hot Plug and Unplug function, connections can be easily changed, even when the computer is in use. In the mobile notebook computer and PDA (Personal Digital Assistant) environment, however, even the connection of a USB cable imposes a large load on a user. Damage to a connector on the host side may be caused by inadvertent insertion and removal of a connector on the device side. It is preferable, therefore, that for a mobile environment a wireless connection be made available.
Typical currently-available wireless communication systems employ the wireless LAN IEEE 802.11 standard and the IrDA communication method. The IEEE 802.11 standard was designed mainly for communication between computers, and is not suitable for communication between computers and peripheral devices. IrDa was designed with the assumption that it would be used for point to point connections, not point to multipoint connections, such as the USB connection. The USB is regarded as a main interface for future apparatuses connected to PCs (Personal Computers), and it is assumed that it will be incorporated in many apparatuses. If a wireless USB can be provided, it can constitute means for the very easy connection of peripheral devices.
IBM TDB, Vol. 40, No. 04, (April 1997) pp. 87-88 teaches a wireless USB. This reference, however, does not take into account problems that will arise with the wireless USB. In IBM TDB, Vol. 37, No. 04B, pp 91-93, (April 1994), a system is disclosed for connecting a wireless module to a conventional bus in a computer and for connecting the wireless module to a peripheral device connected to the bus. In this reference, however, problems caused by a wireless USB are not described.
What is desired is a system configuration for a USB that enables a computer to manage all the devices connected to the USB, and performs polling to acquire communicated data and to detect state changes. Solutions for the following four problems must be found to provide a satisfactory wireless system configuration.
(1) Designation of packet destinationsxe2x80x94The destination of a USB packet is designated by using a USB address or non-specified bus topology, which changes dynamically depending on the configuration of a current device. When wireless communication is employed, an address in one system might be identical to one in another system, and as it is difficult to suppose a definite bus topology, the unique determination of a destination for a packet is not possible.
(2) Time limitation for a responsexe2x80x94According to the USB specification, a device that receives a packet from a host or a function device is required to send a response within a 16-bit time period (1.33 xcexcs when operating at full speed). However, as the wireless communication speed is in general less than the full speed of the USB, 12 Mbps, and as in many cases a collision avoidance mechanism is required, it is difficult to comply with the time requirement for the above bus turn around time.
(3) Frame synchronizationxe2x80x94In order to synchronize with a USB frame of the computer, an SOF packet is issued every Ims. The SOF packet must be transmitted at the start time of the frame precisely, but it is difficult to set a wireless transmission time so exactly due to changes in the environment. Furthermore, when the communication speed is low, the transmission of a synchronous packet every 1 ms imposes a great load on a communication channel.
(4) Control provided by the signal line statexe2x80x94Packets are not employed on the USB for port control functions, such as connection, disconnection, suspension, resumption, and reset, and the execution of port control functions are notified by static changes in signal line states. This method cannot be copied into wireless communication.
It is, therefore, one object of the present invention to provide a method for resolving the above wireless USB problems.
It is another object of the present invention to employ a wireless USB to remove a load imposed by the need to make a cable connection and to facilitate the disconnection and moving of devices.
It is an additional object of the present invention to extend a wireless USB and to provide a mechanism for enabling inter-host communication.
According to the present invention, a wireless hub connected to the USB bus in a computer side, and a wireless port connected to a USB interface of a peripheral device (generally, this is applicable to any device, and hereinafter such a unit will be referred to simply as a device), are provided and wireless communication is performed between the two. The wireless hub performs communication with the computer, and converts a USB packet routed to a device (a routing direction hereinafter sometimes called downstream) into a wireless signal, and a wireless signal received from a device into a USB packet. The wireless port attached to each device also converts a wireless signal into a USB packet and vice versa. While multiple wireless ports are usually connected to a single wireless hub, an arrangement of one wireless hub and a single wireless port is also possible. A wireless hub and a wireless port each have a device identifier (ID) uniquely assigned to them, and in the USB-wireless conversion, a destination specified by a USB address or bus topology, is converted into a device identifier.
A bidirectional buffer, for example, is provided in a wireless hub that, acting as a substitute, sends a response in accordance with the type of received packet and the state of a buffer. A USB packet received from the computer connected to the wireless hub is stored in the buffer, and is transmitted when the wireless medium can be used. A wireless port again converts the received wireless packet into a USB packet, and transmits it to a connected device. The response from the device is converted into a wireless packet, which is then transmitted to the wireless hub and is stored at the buffer therein. When the wireless hub is polled for the same contents by the computer, the wireless hub reads from the buffer the response that was received from the device, and transmits it to the USB bus. During a period at the wireless hub extending from the receipt of the first USB packet to the receipt of a wireless packet from downstream, all communication request (IN/OUT) transactions directed to the same destination are disregarded, and a NAK signal is returned to the computer indicating the device is not ready to perform processing. It should be noted, however, that SETUP transactions are constantly transmitted to the wireless link and ACK signals are returned to the computer. A time out in the USB can be avoided by using the above processing sequence.
The wireless hub periodically broadcasts a packet indicating the port states, and controls the operation of the wireless ports, while at the same time maintaining the frame synchronization in the wireless system. On the other hand, a wireless port for which there is a change in the device state, such as connect, disconnect, or remote wake-up, transmits to the wireless hub notification of the state change as the response to this packet. The length of a packet period is set long enough not to impose an excessive load on a communication channel and short enough not to affect port control. A variance of the transmission time is permitted within a specific period because of the need to coexist with a collision avoidance mechanism. To compensate for the uncertainty relative to the transmission time, a time shift from a scheduled transmission time is specified in a packet. A wireless port transmits a synchronous packet to a device based on its internal clock, and the cycle shift relative to the computer is adjusted by using the periodic packet. A port control command from the computer, such as reset or suspend, is transmitted from the wireless hub as a wireless packet, and the wireless port converts the command into a state change of a USB signal line. Notification of the USB signal line state is relayed by using the periodic packet and the wireless control packet.
In the system of the present invention, two power saving states are provided: a port power disconnected state and a state equivalent to a suspended state. When in the port power disconnected state, the wireless port receives one periodic packet every several transactions, while in the suspended state, the wireless port receives a periodic packet each transaction, and determines whether the wireless hub can be connected to the device or whether the state should be altered to the resumed state. During a period wherein the reception of periodic packets is not anticipated, a device in the power saving state halts the supply of power to all circuits, except for those required for synchronization. As a result, power control can be exercised by the computer and a power saving mechanism required for a portable device is achieved.
When a second wireless apparatus (typically connected to a peripheral device) establishes a connection with a first wireless apparatus communicating with a computer, steps are performed of: transmitting a connection request packet from the first wireless apparatus, including an identifier of the first wireless apparatus in response to receipt of a packet representing the connection with the first wireless apparatus; transmitting a predetermined packet (typically an ACK signal) in response to receipt of a connection permission packet including bus information (typically a port number) concerning a bus of the computer; and, employing the bus information to perform a setup (eg., correspondence of a port number with the identifier of the first wireless apparatus) in response to receipt of a packet that does not specify the second wireless apparatus as a destination. In this manner, after confirming that the communication process has been performed, the second wireless apparatus can identify a currently connected wireless apparatus.
Further, after the predetermined packet has been transmitted, and in response to receipt of a packet specifying the second wireless apparatus as a reception destination, the operation may be returned to the step of transmitting the connection request packet. This means that the first wireless apparatus could not receive the predetermined packet, and the connection process must be performed again.
When a first wireless apparatus communicating with a computer establishes a connection with a second wireless apparatus (typically connected to a peripheral device), steps are performed of: generating first bus information (typically a port number) concerning a bus of the computer for the second wireless apparatus in response to receipt of a connection request packet including an identifier of the second wireless apparatus from the second wireless apparatus; transmitting a connection permission packet including the first bus information to the second wireless apparatus; employing the identification data and the first bus information to perform a setup (e.g., registration of those) in response to receipt of a predetermined packet (typically an ACK signal) from the second wireless apparatus; and employing the second bus information to perform a setup (e.g., registration of the identifier and the first and second bus information) if the computer generates second bus information (a USB address in an embodiment) corresponding to the first bus information. As a result, data required for communication between the computer and the second wireless apparatus are correlatively registered.
In the above case, when a predetermined packet is not received within a predetermined period of time following transmission of the connection permission packet, a packet may be transmitted that designates as a destination the second wireless apparatus that transmitted the connection request packet. The final procedure is not performed even though the connection request packet was transmitted, because it is assumed that some problem has occurred. The second wireless apparatus is specifically designated as a destination in a packet sent to check the operating condition.
A periodic packet transmitted after the predetermined packet was received from the second wireless apparatus may not specify as a destination the second wireless apparatus that transmitted the connection request packet. This is because notification was dispatched to the second wireless apparatus that the first wireless apparatus could receive the predetermined packet.
When a first wireless apparatus communicating with a computer performs wireless communication with a second wireless apparatus communicating with a device (typically a peripheral device), steps are performed of: in response to a communication request with the device from the computer, transmitting a NAK signal, which indicates that the device is not ready to perform processing, to the computer within a response limit; and transmitting the communication request to the second wireless apparatus. As a result, a response limit defined by the bus of the computer can be coped with.
A step may be further performed of; in response to the same request as the communication request, successively transmitting the NAK signal to the computer within the response limit until a response is received from the second wireless apparatus. This is an effective means to evade the bus time out if transmission of multiple NAK signals is permitted.
Furthermore, if the communication request is for reading data from the device, steps may be performed of: transmitting a predetermined packet to the second wireless apparatus in response to receipt of data from the second wireless apparatus; and transmitting the received data to the computer in response to the same request as the communication request. Since the buffer is employed, the data extracted from the device can be output as a response to the same communication request as the preceding request.
If the communication request is a request for writing data to the device, data to be written can be transmitted with the communication request to the second wireless apparatus. If the communication request and the data to be written are contained in separate packets, there is a time lag in the wireless communication.
When a first wireless apparatus communicating with a device performs wireless communication with a second wireless apparatus, steps are performed of: transmitting a read request to the device in response to receipt of data reading request from the second wireless apparatus; returning a predetermined message (typically, an ACK signal) to the device in response to receipt of data from the device; and transmitting the data to the second wireless apparatus. Since the period for transmitting a predetermined packet is determined by the specification of a computer bus, the second wireless apparatus must send a response to the device in place of the computer.
When a state change is communicated to a second wireless apparatus from a first wireless apparatus communicating with a computer, steps are performed of: transmitting a suspend command to the second wireless apparatus in response to receipt of a suspend command from the computer; transmitting a periodic packet including a state bit that indicates the second wireless apparatus is in a suspended state, after the suspend command has been transmitted; and transmitting a periodic packet including a state bit representing the second wireless apparatus in an enabled state, in response to receipt of a resume command from the computer. Since the second wireless apparatus receives only a periodic packet once it has been moved to the suspended state, a packet other than the periodic packet cannot be employed to enable the second wireless apparatus. Therefore, the port state bit of the periodic packet is employed.
When a second wireless apparatus communicating with a first wireless apparatus performs a state change, steps are performed of: in response to receipt of a periodic packet including a state bit representing the state of the second wireless apparatus being disabled; determining whether or not a predetermined command was received from the first wireless apparatus before the periodic packet was received; and, changing the state of the second wireless apparatus to a state other than a connected state if the predetermined command is not received. In this case, an abnormality has occurred in the wireless communication, and when the state is returned to the powered-off state, the succeeding process will be more easily performed. The predetermined command can be a port suspend command or a disable command.
The wireless apparatus can be attached to the computer either externally or internally, and can also be either attached to a USB interface of the device, or mounted inside the device. When a first computer establishes a connection with a second computer in wireless communication, steps are performed of: activating a first device bridge (a DDB in the embodiment) having an interface for a bus of the first computer and a buffer for storing data concerning the wireless communication, in response to a command from the first computer; in response to receiving a packet representing permission of the connection by a device bridge from the second computer across the second wireless channel used by the second computer, transmitting across the second wireless channel to the second computer a connection request packet including data concerning a first wireless channel used by the first computer; in response to receipt of a connection permission packet across the first wireless channel from the second computer, transmitting a predetermined packet (typically, an ACK signal) across the second wireless channel to the second computer; transmitting across the first wireless channel a packet specifying a second device bridge in the second computer that includes an interface relative to a bus of the second computer and a buffer for storing data concerning the wireless communication; in response to receipt of a connection request packet across the first wireless channel from the second computer, transmitting a connection permission packet to the second computer across the first wireless channel; and in response to receipt of a predetermined packet across the first wireless channel from the second computer, employing the data concerning the second wireless channel and first bus information (a port number in the embodiment) concerning the bus of the first computer to perform a setup.
To establish a connection between hosts, the first and the second device bridges are provided, the connection establishment process described first is performed twice, and separate communication channels are employed. As a result, while communication between each host and its peripheral devices is enabled, communication between the hosts can also be performed. For example, when several persons having their portable computers gather, they can communicate with each other using their portable computers without altering the configuration of peripheral devices of the portable computers.
The first computer further performs a step of generating second bus information (a USB address in the embodiment) relative to the first device bridge. When a second computer establishes a connection with a first computer via wireless communication, steps are performed of: receiving a connection request packet including data concerning a first wireless channel used by the first computer, across a second wireless channel used by the second computer; activating a second device bridge (a DDB in the embodiment) including an interface for a bus of the second computer and a buffer for storing data concerning the wireless communication; transmitting a connection permission packet to the first computer across the second wireless channel; in response to receipt of a packet designating the second device bridge across the first wireless channel from the first computer, transmitting a connection request packet to the first computer through the first wireless channel; in response to receipt of a connection permission packet across the first wireless channel from the first computer, transmitting a predetermined packet (typically an ACK signal); and in response to receipt of a packet that does not designate the second device bridge across the first wireless channel from the first computer, employing data concerning the first wireless channel and third bus information concerning a bus of the second computer to perform a setup. The second computer further performs a step of generating fourth bus information (a USB address in the embodiment) relative to the second device bridge.
The processing for the present invention has been explained, and an apparatus for performing the processing can also be constructed that can serve as a wireless apparatus and can be connected to a computer, or incorporated in the computer body. Further, the processing can be performed by a program that in this case may be stored in a nonvolatile memory, such as a ROM, or on a storage medium, such as a floppy disk.